3.1.34 \(\int \frac {(1+\sin (x^2))^2}{x^3} \, dx\) [34]

Optimal. Leaf size=44 \[ -\frac {3}{4 x^2}+\frac {\cos \left (2 x^2\right )}{4 x^2}+\text {Ci}\left (x^2\right )-\frac {\sin \left (x^2\right )}{x^2}+\frac {\text {Si}\left (2 x^2\right )}{2} \]

[Out]

-3/4/x^2+Ci(x^2)+1/4*cos(2*x^2)/x^2+1/2*Si(2*x^2)-sin(x^2)/x^2

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3484, 3461, 3378, 3380, 3460, 3383} \begin {gather*} \text {CosIntegral}\left (x^2\right )+\frac {\text {Si}\left (2 x^2\right )}{2}-\frac {3}{4 x^2}-\frac {\sin \left (x^2\right )}{x^2}+\frac {\cos \left (2 x^2\right )}{4 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + Sin[x^2])^2/x^3,x]

[Out]

-3/(4*x^2) + Cos[2*x^2]/(4*x^2) + CosIntegral[x^2] - Sin[x^2]/x^2 + SinIntegral[2*x^2]/2

Rule 3378

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(c + d*x)^(m + 1)*(Sin[e + f*x]/(d*(m
 + 1))), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3380

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3460

Int[(x_)^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sin[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 3461

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Cos[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 3484

Int[((e_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Sin[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 1] && IGtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\left (1+\sin \left (x^2\right )\right )^2}{x^3} \, dx &=\int \left (\frac {3}{2 x^3}-\frac {\cos \left (2 x^2\right )}{2 x^3}+\frac {2 \sin \left (x^2\right )}{x^3}\right ) \, dx\\ &=-\frac {3}{4 x^2}-\frac {1}{2} \int \frac {\cos \left (2 x^2\right )}{x^3} \, dx+2 \int \frac {\sin \left (x^2\right )}{x^3} \, dx\\ &=-\frac {3}{4 x^2}-\frac {1}{4} \text {Subst}\left (\int \frac {\cos (2 x)}{x^2} \, dx,x,x^2\right )+\text {Subst}\left (\int \frac {\sin (x)}{x^2} \, dx,x,x^2\right )\\ &=-\frac {3}{4 x^2}+\frac {\cos \left (2 x^2\right )}{4 x^2}-\frac {\sin \left (x^2\right )}{x^2}+\frac {1}{2} \text {Subst}\left (\int \frac {\sin (2 x)}{x} \, dx,x,x^2\right )+\text {Subst}\left (\int \frac {\cos (x)}{x} \, dx,x,x^2\right )\\ &=-\frac {3}{4 x^2}+\frac {\cos \left (2 x^2\right )}{4 x^2}+\text {Ci}\left (x^2\right )-\frac {\sin \left (x^2\right )}{x^2}+\frac {\text {Si}\left (2 x^2\right )}{2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 41, normalized size = 0.93 \begin {gather*} \frac {-3+\cos \left (2 x^2\right )+4 x^2 \text {Ci}\left (x^2\right )-4 \sin \left (x^2\right )+2 x^2 \text {Si}\left (2 x^2\right )}{4 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + Sin[x^2])^2/x^3,x]

[Out]

(-3 + Cos[2*x^2] + 4*x^2*CosIntegral[x^2] - 4*Sin[x^2] + 2*x^2*SinIntegral[2*x^2])/(4*x^2)

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 39, normalized size = 0.89

method result size
default \(-\frac {3}{4 x^{2}}+\cosineIntegral \left (x^{2}\right )+\frac {\cos \left (2 x^{2}\right )}{4 x^{2}}+\frac {\sinIntegral \left (2 x^{2}\right )}{2}-\frac {\sin \left (x^{2}\right )}{x^{2}}\) \(39\)
risch \(\cosineIntegral \left (x^{2}\right )-\frac {i \pi \,\mathrm {csgn}\left (i x^{2}\right ) \mathrm {csgn}\left (x^{2}\right )}{2}+\frac {i \pi \,\mathrm {csgn}\left (i x^{2}\right )}{2}-\frac {3}{4 x^{2}}-\frac {\pi \,\mathrm {csgn}\left (x^{2}\right )}{4}+\frac {\sinIntegral \left (2 x^{2}\right )}{2}-\frac {\sin \left (x^{2}\right )}{x^{2}}+\frac {\cos \left (2 x^{2}\right )}{4 x^{2}}\) \(72\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+sin(x^2))^2/x^3,x,method=_RETURNVERBOSE)

[Out]

-3/4/x^2+Ci(x^2)+1/4*cos(2*x^2)/x^2+1/2*Si(2*x^2)-sin(x^2)/x^2

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.34, size = 54, normalized size = 1.23 \begin {gather*} \frac {x^{2} {\left (i \, \Gamma \left (-1, 2 i \, x^{2}\right ) - i \, \Gamma \left (-1, -2 i \, x^{2}\right )\right )} - 1}{4 \, x^{2}} - \frac {1}{2 \, x^{2}} + \frac {1}{2} \, \Gamma \left (-1, i \, x^{2}\right ) + \frac {1}{2} \, \Gamma \left (-1, -i \, x^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+sin(x^2))^2/x^3,x, algorithm="maxima")

[Out]

1/4*(x^2*(I*gamma(-1, 2*I*x^2) - I*gamma(-1, -2*I*x^2)) - 1)/x^2 - 1/2/x^2 + 1/2*gamma(-1, I*x^2) + 1/2*gamma(
-1, -I*x^2)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 47, normalized size = 1.07 \begin {gather*} \frac {x^{2} \operatorname {Ci}\left (-x^{2}\right ) + x^{2} \operatorname {Ci}\left (x^{2}\right ) + x^{2} \operatorname {Si}\left (2 \, x^{2}\right ) + \cos \left (x^{2}\right )^{2} - 2 \, \sin \left (x^{2}\right ) - 2}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+sin(x^2))^2/x^3,x, algorithm="fricas")

[Out]

1/2*(x^2*cos_integral(-x^2) + x^2*cos_integral(x^2) + x^2*sin_integral(2*x^2) + cos(x^2)^2 - 2*sin(x^2) - 2)/x
^2

________________________________________________________________________________________

Sympy [A]
time = 2.52, size = 51, normalized size = 1.16 \begin {gather*} - \log {\left (x^{2} \right )} + \frac {\log {\left (x^{4} \right )}}{2} + \operatorname {Ci}{\left (x^{2} \right )} + \frac {\operatorname {Si}{\left (2 x^{2} \right )}}{2} - \frac {\sin {\left (x^{2} \right )}}{x^{2}} + \frac {\cos {\left (2 x^{2} \right )}}{4 x^{2}} - \frac {3}{4 x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+sin(x**2))**2/x**3,x)

[Out]

-log(x**2) + log(x**4)/2 + Ci(x**2) + Si(2*x**2)/2 - sin(x**2)/x**2 + cos(2*x**2)/(4*x**2) - 3/(4*x**2)

________________________________________________________________________________________

Giac [A]
time = 6.05, size = 39, normalized size = 0.89 \begin {gather*} \frac {4 \, x^{2} \operatorname {Ci}\left (x^{2}\right ) + 2 \, x^{2} \operatorname {Si}\left (2 \, x^{2}\right ) + \cos \left (2 \, x^{2}\right ) - 4 \, \sin \left (x^{2}\right ) - 3}{4 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+sin(x^2))^2/x^3,x, algorithm="giac")

[Out]

1/4*(4*x^2*cos_integral(x^2) + 2*x^2*sin_integral(2*x^2) + cos(2*x^2) - 4*sin(x^2) - 3)/x^2

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \mathrm {cosint}\left (x^2\right )+\frac {\mathrm {sinint}\left (2\,x^2\right )}{2}-\frac {\sin \left (x^2\right )}{x^2}+\frac {{\cos \left (x^2\right )}^2}{2\,x^2}-\frac {1}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(x^2) + 1)^2/x^3,x)

[Out]

cosint(x^2) + sinint(2*x^2)/2 - sin(x^2)/x^2 + cos(x^2)^2/(2*x^2) - 1/x^2

________________________________________________________________________________________